<?xml version="1.0" encoding="UTF-8" standalone="no"?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  <head>
    <meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
    <title>Chapter 29.  Building Berkeley DB for Windows CE</title>
    <link rel="stylesheet" href="gettingStarted.css" type="text/css" />
    <meta name="generator" content="DocBook XSL Stylesheets V1.73.2" />
    <link rel="start" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
    <link rel="up" href="index.html" title="Berkeley DB Programmer's Reference Guide" />
    <link rel="prev" href="build_win_faq.html" title="Windows FAQ" />
    <link rel="next" href="build_wince_notes.html" title="Windows CE notes" />
  </head>
  <body>
    <div class="navheader">
      <table width="100%" summary="Navigation header">
        <tr>
          <th colspan="3" align="center">Chapter 29. 
		Building Berkeley DB for Windows CE
        </th>
        </tr>
        <tr>
          <td width="20%" align="left"><a accesskey="p" href="build_win_faq.html">Prev</a> </td>
          <th width="60%" align="center"> </th>
          <td width="20%" align="right"> <a accesskey="n" href="build_wince_notes.html">Next</a></td>
        </tr>
      </table>
      <hr />
    </div>
    <div class="chapter" lang="en" xml:lang="en">
      <div class="titlepage">
        <div>
          <div>
            <h2 class="title"><a id="build_wince"></a>Chapter 29. 
		Building Berkeley DB for Windows CE
        </h2>
          </div>
        </div>
      </div>
      <div class="toc">
        <p>
          <b>Table of Contents</b>
        </p>
        <dl>
          <dt>
            <span class="sect1">
              <a href="build_wince.html#build_wince_intro">Building for Windows CE</a>
            </span>
          </dt>
          <dd>
            <dl>
              <dt>
                <span class="sect2">
                  <a href="build_wince.html#id1633978">Building Berkeley DB for Windows CE</a>
                </span>
              </dt>
              <dt>
                <span class="sect2">
                  <a href="build_wince.html#id1633895">Building Berkeley DB for different target CPU architectures</a>
                </span>
              </dt>
            </dl>
          </dd>
          <dt>
            <span class="sect1">
              <a href="build_wince_notes.html">Windows CE notes</a>
            </span>
          </dt>
          <dt>
            <span class="sect1">
              <a href="build_wince_faq.html">Windows CE/Mobile FAQ</a>
            </span>
          </dt>
        </dl>
      </div>
      <div class="sect1" lang="en" xml:lang="en">
        <div class="titlepage">
          <div>
            <div>
              <h2 class="title" style="clear: both"><a id="build_wince_intro"></a>Building for Windows CE</h2>
            </div>
          </div>
        </div>
        <div class="toc">
          <dl>
            <dt>
              <span class="sect2">
                <a href="build_wince.html#id1633978">Building Berkeley DB for Windows CE</a>
              </span>
            </dt>
            <dt>
              <span class="sect2">
                <a href="build_wince.html#id1633895">Building Berkeley DB for different target CPU architectures</a>
              </span>
            </dt>
          </dl>
        </div>
        <p>This page contains general instructions on building Berkeley DB for
Windows CE platforms using specific compilers.</p>
        <p>The <code class="filename">build_wince</code> directory in the Berkeley DB distribution contains
project files for Microsoft eMbedded Visual C++:</p>
        <div class="informaltable">
          <table border="1" width="80%">
            <colgroup>
              <col />
              <col />
            </colgroup>
            <thead>
              <tr>
                <th>Project File</th>
                <th>Description</th>
              </tr>
            </thead>
            <tbody>
              <tr>
                <td align="center">Berkeley_DB.vcw</td>
                <td align="center">eMbedded Visual C++ 4.0 workspace</td>
              </tr>
              <tr>
                <td align="center">*.vcp</td>
                <td align="center">eMbedded Visual C++ 4.0 projects</td>
              </tr>
            </tbody>
          </table>
        </div>
        <p>These project files can be used to build Berkeley DB for the Windows CE platform.</p>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="id1633978"></a>Building Berkeley DB for Windows CE</h3>
              </div>
            </div>
          </div>
          <div class="sect3" lang="en" xml:lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h4 class="title"><a id="id1633369"></a>eMbedded Visual C++ 4.0</h4>
                </div>
              </div>
            </div>
            <div class="orderedlist">
              <ol type="1">
                <li>Choose <span class="emphasis"><em>File -&gt; Open Workspace...</em></span>.
Navigate to the <code class="filename">build_wince</code> directory, select <code class="filename">Berkeley_DB</code>
and click Open.</li>
                <li>Choose the project configuration from the
<span class="emphasis"><em>Build -&gt; Set Active Configuration...</em></span> drop-down menu on the
tool bar.  The correct target will usually db_small - Win32 (WCE emulator)
Debug or Release.</li>
                <li>To build, press F7, or select <span class="emphasis"><em>Build</em></span> from the drop-down menu on the tool bar.</li>
              </ol>
            </div>
          </div>
          <div class="sect3" lang="en" xml:lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h4 class="title"><a id="id1633370"></a>Build results</h4>
                </div>
              </div>
            </div>
            <p>The results of your build will be placed in a subdirectory of
<code class="filename">build_windows</code> named after the configuration you chose (for
examples, <code class="filename">build_wince\Release</code> or
<code class="filename">build_wince\Debug</code>).</p>
            <p>When building your application during development, you should normally
link against
<code class="filename">build_wince\Debug\libdb_small48sd.lib</code>.  You can
also build using a release version of the Berkeley DB libraries and tools,
which will be placed in
<code class="filename">build_windows\Release\libdb_small48s.lib</code>.
You will also need to add the <code class="filename">build_wince</code> directory to the list
of include directories of your application's project, or copy the Berkeley DB
include files to a location in your Visual Studio include path.</p>
          </div>
        </div>
        <div class="sect2" lang="en" xml:lang="en">
          <div class="titlepage">
            <div>
              <div>
                <h3 class="title"><a id="id1633895"></a>Building Berkeley DB for different target CPU architectures</h3>
              </div>
            </div>
          </div>
          <p>There are many possible target CPU architectures for a Windows CE
application.  This section outlines the process required to add a new
target architecture to the project files supplied with Berkeley DB.</p>
          <div class="sect3" lang="en" xml:lang="en">
            <div class="titlepage">
              <div>
                <div>
                  <h4 class="title"><a id="id1633535"></a>eMbedded Visual C++ 4.0</h4>
                </div>
              </div>
            </div>
            <div class="orderedlist">
              <ol type="1">
                <li>Choose <span class="emphasis"><em>File -&gt; Open Workspace...</em></span>.
Navigate to the <code class="filename">build_wince</code> directory, select <code class="filename">Berkeley_DB</code>
and click Open.</li>
                <li>Choose the <span class="emphasis"><em>Build -&gt; Configurations...</em></span> menu item.</li>
                <li>Click the <span class="emphasis"><em>Add...</em></span> button.</li>
                <li>Select the desired CPU architecture from the first dropdown box. Select an
existing target to copy the settings from (The corresponding emulator
target is a good choice). Configuration should be either Debug or Release.
Click <span class="emphasis"><em>OK</em></span>.</li>
                <li>Choose the <span class="emphasis"><em>Build -&gt; Set Active Configuration...</em></span> menu
item. Choose the new target then click OK.</li>
                <li>Select the <span class="emphasis"><em>Project -&gt; Settings...</em></span> menu item. Under
the C/C++ tab, select the Preprocessor <span class="emphasis"><em>Category</em></span>. In the
<span class="emphasis"><em>Additional include directories:</em></span> field add: ".,.."
without the quotes. Click OK.</li>
                <li>Build as per the instructions in <span class="emphasis"><em>Building Berkeley DB for Windows
CE</em></span> above.</li>
              </ol>
            </div>
          </div>
        </div>
      </div>
    </div>
    <div class="navfooter">
      <hr />
      <table width="100%" summary="Navigation footer">
        <tr>
          <td width="40%" align="left"><a accesskey="p" href="build_win_faq.html">Prev</a> </td>
          <td width="20%" align="center"> </td>
          <td width="40%" align="right"> <a accesskey="n" href="build_wince_notes.html">Next</a></td>
        </tr>
        <tr>
          <td width="40%" align="left" valign="top">Windows FAQ </td>
          <td width="20%" align="center">
            <a accesskey="h" href="index.html">Home</a>
          </td>
          <td width="40%" align="right" valign="top"> Windows CE notes</td>
        </tr>
      </table>
    </div>
  </body>
</html>
